# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=docparser-git
pkgver=1.0.1.r0.g908a80a
pkgrel=1
sourcename=docparser
sourcedir="$sourcename"
sourcetars=("$sourcename"_"$pkgver".tar.xz)
pkgdesc='A document parser library ported from document2html'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/docparser"
license=('GPL3')
depends=(
    'poppler'
    'libzip'
    'pugixml'
    'freetype2'
    'libxml2'
    'util-linux-libs'  # for uuid
    'tinyxml2'
)
makedepends=(
    'cmake'
    'pkg-config'
)
conflicts=('docparser')
provides=('docparser')
groups=('deepin-git')
source=("${sourcetars[@]}")

b2sums=('SKIP')

build() {
    cd $sourcedir
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=None
    cmake --build build
}

package() {
    cd $sourcedir
    DESTDIR="$pkgdir" cmake --install build
}
